
//Copyright 1997-2009 Syrinx Development, Inc.
//This file is part of the Syrinx Web Application Framework (SWAF).
// == BEGIN LICENSE ==
//
// Licensed under the terms of any of the following licenses at your
// choice:
//
//  - GNU General Public License Version 3 or later (the "GPL")
//    http://www.gnu.org/licenses/gpl.html
//
//  - GNU Lesser General Public License Version 3 or later (the "LGPL")
//    http://www.gnu.org/licenses/lgpl.html
//
//  - Mozilla Public License Version 1.1 or later (the "MPL")
//    http://www.mozilla.org/MPL/MPL-1.1.html
//
// == END LICENSE ==
using System;

using Swaf.Gui;

namespace Syrinx.Gui
{
    /// <summary>
    /// Defines the contract for how Action Param configuration controls should interact
    /// with ActionParamConfigurationBizProc.  When a bizproc action takes a parameter that 
    /// is driven by a user's input, implementations of this interface are used by configure
    /// that parameter via user input.
    /// </summary>
    public interface IActionParamDisplay
    {
        /// <summary>
        /// Called when the implementation needs to configure its display based on the state
        /// of the action.  This is important when the action is driven by parameters that need
        /// to be used to drive the popuplation of UI, such as adding list items to a combobox.
        /// </summary>
        /// <param name="action">The action that is being configured</param>
        void setupForAction(IAction action);

        /// <summary>
        /// When the user triggers they are done configuring the params for the source action,
        /// this method is called for the implementation to return a populated control.
        /// </summary>
        /// <returns>The parameters specified for the user that will be passed directly into
        /// the source action trigger.</returns>
        object getActionParam();
    }
}
